package com.srxz.personnelsystem.util;

import com.srxz.personnelsystem.system.entity.Department;
import com.srxz.personnelsystem.system.mapper.dto.DepartmentDTO;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName: TreeView
 * @author: wgchao
 * @createTime: 2019/2/22 11:03 AM
 * @Description: TODO
 */
@Data
public class TreeView implements Serializable {
    private String id;
    private String text;
    private String herf;
    private String tags;

    private List<TreeView> nodes;

    public static TreeView getInstance(DepartmentDTO department){
        TreeView treeView = new TreeView();
        treeView.setText(department.getName());
        treeView.setId(department.getId());
        return treeView;
    }
}
